WIP: xtrabackup implementation + allow_master#4614
WIP: xtrabackup implementation + allow_master#4614deepthi wants to merge 5 commits intovitessio:masterfrom
Conversation
… first pass at implementing xtrabackup. add allow_master option to vtctl backup commands Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
|
|
||
| func commandBackup(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { | ||
| concurrency := subFlags.Int("concurrency", 4, "Specifies the number of compression/checksum jobs to run simultaneously") | ||
| allowMaster := subFlags.Bool("allow_master", false, "Allows backups to be taken on master. Warning!! If you are using the builtin backup engine, this will shutdown your master mysql for as long as it takes to create a backup ") |
There was a problem hiding this comment.
can we make it so that allow_master is a no-op if it would be harmful?
There was a problem hiding this comment.
how would we define "harmful"? If there is a way to define that we can look into implementing it.
The idea behind the proposal in the original issue (#4557) was that the user is explicitly overriding the constraint that dis-allows backups from master.
There was a problem hiding this comment.
@acharis One check I implemented is that even if allow_master is specified with a BackupTablet command, we will first try to do a backup using one of the other types of vttablet(REPLICA/RDONLY/SPARE). Only if none of those is available we will use MASTER. I know this isn't what you asked, but FYI.
Signed-off-by: deepthi <deepthi@planetscale.com>
…rary with execCommand because xtrabackup's tar file format is weird Signed-off-by: deepthi <deepthi@planetscale.com>
|
Could we rebase this branch with: #4653 please? So we don't see diffs from that PR in here. |
Signed-off-by: deepthi <deepthi@planetscale.com>
|
Moved the xtrabackup implementation to its own PR: #4695 |
Refactor backup/restore to abstract out the backup engine.
Current logic where we do all the work is now called
builtin.Initial support for
xtrabackupbackup and restore. Tests TBI.Add allow_master command line option to vtctl Backup and BackupShard commands.
All feedback and suggestions on code structure, coupling etc. are welcome.
cc @derekperkins @dkhenry @demmer @rafael